import request from '../utils/request.js'
import  moment  from 'moment'

// 加载评论
export const load = () => {
  return request.get('/getComment')
}

// 发布评论
export const sent = (content) => {
  return request.post('/postComment', content)
}

// 删除评论
export const del = async (id) => {
  return request.delete(`/delComment?id=${id}`)
}

// 转化时间
export const changeTime = (time) => {
    return moment(time).format('YYYY-MM-DD HH:mm:ss')
  }